package com.otherTest.Math;

import org.junit.Test;

/**
 * @author Conceit
 * @since 1.0 2017/7/25
 */
public class TestArea {

    @Test
    public void testArea1() {
        //
        System.out.println(Math.PI * (Math.pow(2, 2)));
        //4
        System.out.println(Math.pow(2, 2));
        //
        System.out.println(Math.PI * 4);

    }

    @Test
    public void testArea2() {
        //正确转换
        System.out.println(Math.tan((30.00 / 2.00) * Math.PI / 180));
        //默认计算方式为弧度
        System.out.println(Math.tan(30.00 / 2.00));
        System.out.println(Math.toDegrees(0.8559934009085188));

        Math.tan((30.00 / 2.00) * Math.PI / 180);
    }
}
